import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { initMysql } from 'decorator-mysql';

/**
 * 先执行将decorator_mysql.sql导入至数据库,再运行项目
 */

async function bootstrap() {

  initMysql({
    host: 'localhost',
    user: 'root',
    password: '123456',
    database: 'decorator_mysql',
    port: 3306,
    connectionLimit: 10,
  });

  const app = await NestFactory.create(AppModule);

  await app.listen(3000);
  console.log('http://localhost:3000');
}
bootstrap();
